package org.jetlinks.community.mstn.handler;

import org.jetlinks.community.mstn.MstnAssetsHolder;
import org.jetlinks.community.mstn.logging.MstnAssetsRequestCtx;
import reactor.core.publisher.Mono;

import java.util.Collection;
import java.util.function.BiFunction;
import java.util.function.Function;

public class MstnAssetsAutoBindHandler  implements MstnAssetsHandler{

//    private int argIndex;
//    private MstnAssetsDefine ann;
//    private boolean returnMono;
//    private boolean returnFlux;
//    private Function<Collection<?>, Collection<?>> idMapper;
//    private BiFunction<MstnAssetsHolder,Collection<?>,Mono<Void>> afterHandler;
//
//    public MstnAssetsAutoBindHandler(int argIndex, MstnAssetsDefine ann, boolean returnMono, boolean returnFlux, Function<Collection<?>, Collection<?>> idMapper, BiFunction<MstnAssetsHolder, Collection<?>, Mono<Void>> afterHandler) {
//        this.argIndex = argIndex;
//        this.ann = ann;
//        this.returnMono = returnMono;
//        this.returnFlux = returnFlux;
//        this.idMapper = idMapper;
//        this.afterHandler = afterHandler;
//    }

    @Override
    public Mono<Void> beforeHandler(MstnAssetsRequestCtx requestCtx) {
        //获取参数中的资产ID,将args[argIndex]转换为集合类型Collection<?> id


        return Mono.empty();
    }
}
